import { request } from '@umijs/max';

// 请求供应商列表
export async function querySupplierList(body: any, options?: { [key: string]: any }) {
  return request('/supplier/supplierlist', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

// 更新供应商数据
export async function updateSupplier(params: any, options?: { [key: string]: any }) {
  return request('/supplier/supplierupdate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
    ...(options || {}),
  });
}

// 新增供应商
export async function addSupplier(body: any, options?: { [key: string]: any }) {
  return request('/supplier/supplieradd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

// 删除供应商
export async function deleteSupplier(body: any, options?: { [key: string]: any }) {
  return request('/supplier/supplierdelete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


